<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>renren-aui</title>
  <link rel="stylesheet" href="../../aui/plugins/ionicons-4.3.0/css/ionicons.min.css">
  <link rel="stylesheet" href="../../aui/css/element-theme/index.css">
  <link rel="stylesheet" href="../../aui/css/aui.css">
</head>
<body>
  <div v-cloak class="aui-wrapper aui-page__list-table">
    <div class="aui-content__wrapper">
      <main class="aui-content">
        <el-card shadow="never" class="aui-card--fill">
          
        </el-card>
      </main>
    </div>
  </div>
  <script src="../../aui/plugins/vue-2.5.17/vue.js"></script>
  <script src="../../aui/plugins/element-2.4.5/index.js"></script>
  <script src="../../aui/plugins/axios-0.18.0/axios.min.js"></script>
  <script>
    (function () {
      var vm = window.vm = new Vue({
        el: '.aui-wrapper',
        data: function () {
          return {
            dataForm: {
              title: '',
              date: null,
              goal: '',
              standard: '',
              client: '',
              invites: '',
              weight: 0,
              public: 1
            },
            dataRule: {
              title: [
                { required: true, message: '必填项不能为空', trigger: 'blur' }
              ],
              date: [
                { required: true, message: '必填项不能为空', trigger: 'change' }
              ],
              goal: [
                { required: true, message: '必填项不能为空', trigger: 'blur' }
              ],
              standard: [
                { required: true, message: '必填项不能为空', trigger: 'blur' }
              ]
            }
          }
        },
        beforeCreate () {
          vm = this;
        },
        methods: {
          // 表单提交
          dataFormSubmitHandle: function () {
            vm.$refs['dataForm'].validate(function (valid) {
              if (valid) {
                window.parent.vm.$message({
                  message: '操作成功',
                  type: 'success',
                  duration: 1500,
                  onClose: function () {
                    console.log(vm.dataForm);
                  }
                });
              }
            });
          },
          // 表单重置
          dataFormResetHandle: function () {
            vm.$refs['dataForm'].resetFields();
          }
        }
      });
    })();
  </script>
</body>
</html>